/**
 * Copyright(c) 2013 Jade Techonologies Co., Ltd.
 *
 * History:
 *   13-5-7 上午10:54 Created by sky
 */
package com.jade.bss.base.provision;

import com.jade.framework.base.pattern.pipeline.Valve;
import com.jade.framework.base.pattern.pipeline.ValveChain;

/**
 * 业务处理阀门。
 *
 * @author sky
 * @version 1.0 13-5-7 上午10:54
 */
public abstract class ProvsionValve<C extends ProvisionContext, E extends Exception>
        extends Valve<C, E>
{
    public void handle(C c, ValveChain<C, E> chain)
            throws E
    {
        doHandle(c);
        chain.handleNext(c);
    }

    protected abstract void doHandle(C context)
            throws E;
}
